

let columns=[
    {
        dataField: "related",
        dataType: "string",
        caption: "关联方",
        alignment: "left",
        width: 190,
        // sortIndex:1,
        fixed: true,
        fixedPosition: 'left',
       
        // validationRules:[
        //     {
        //         type: 'required',
        //         message:'关联方是必填项',
        //         trim:true
        //     }
        // ]

    },
    {
        dataField: "itemName",
        dataType: "string",
        caption: "试算项目",
        alignment: "left",
        width: 220,
        fixed: true,
        fixedPosition: 'left',
        allowEditing:false,
        // validationRules:[
        //     {
        //         type: 'required',
        //         message:'试算项目是必填项',
        //         trim:true
        //     }
        // ]
    },
    {
        dataField: "from_type",
        dataType: "string",
        caption: "来源",
        alignment: "left",
        width: 70,
        allowEditing:false,
        fixedPosition: 'left',
        // sortIndex:0,
        // sortOrder:'desc',
        fixed: true,
        customizeText: (cellInfo:any) => {
            if (cellInfo.value) {
                return cellInfo.value 
            } 
            else {
                return '手动添加'
            }
           
        }
    },
    {
        dataField: "KMMC",
        dataType: "string",
        caption: "科目名称",
        alignment: "left",
        width: 220,
        allowEditing:false,
    },
    {
        dataField: "DG_NAME",
        dataType: "string",
        caption: "底稿表页名称",
        alignment: "left",
        width: 150,
        allowEditing:false,
    },
    {
        dataField: "KXXZ",
        dataType: "string",
        caption: "款项性质",
        alignment: "left",
        width: 220
    },
]

export const columnsDataM = [
   ...columns,
    {
        dataField: "QMSDYZ",
        format: 'fixedPoint',
        dataType: "number",
        caption: "期末审定原值",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        width: 160,
        alignment: "right",
    },
    {
        caption: "审定账龄",
        alignment: "center",
        columns: [
            // // 例如：1至3月M3(取M开头的+最后的月数)
        ]
    },
    {
        dataField: "HZZB",
        dataType: "number",
        caption: "坏账准备",
        alignment: "right",
        width: 140
    },
   
];

export const columnsDataC = [
    ...columns,
    {
        dataField: "QCSDYZ",
        caption: "期初审定原值",
        format: 'fixedPoint',
        dataType: "number",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        width: 160,
        alignment: "right",
    },
    {
        caption: "审定账龄",
        alignment: "center",
        columns: [
            // 例如：1至3月M3(取M开头的+最后的月数)
        ]
    },
    {
        dataField: "HZZB",
        dataType: "number",
        caption: "坏账准备",
        alignment: "right",
        width: 140
    },
   
];
